]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
dbusServices/screencast: Add more debug logging
authorFlorian Müllner <fmuellner@gnome.org>
Wed, 26 Aug 2026 22:17:37 +0000 (00:17 +0200)
committerFlorian Müllner <fmuellner@gnome.org>
Sun, 13 Sep 2026 17:39:10 +0000 (19:39 +0200)
Commit 8286ec5bb176c added some debug logging, but we still only log
a message when the pipeline creation fails directly. Add more logging
so that we always indicate why we are moving to the next pipeline
config.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/4361>
(cherry picked from commit 5e9de9693593a7cbf2710562024531c16b62d8af)

js/dbusServices/screencast/screencastService.js

index bd2381a8fd25362524619e1ea105518fb534417e..e3b745bd2b0587f2f4239055969739f23582b818 100644 (file)
@@ -331,6 +331,8 @@ class Recorder extends Signals.EventEmitter {
             retval === Gst.StateChangeReturn.ASYNC) {
             // We'll wait for the state change message to PLAYING on the bus
         } else {
+            const changeString = Gst.StateChangeReturn.get_name(retval);
+            console.debug(`Setting PLAYING state on pipeline returned ${changeString}`);
             this._tryNextPipeline();
         }
     }
@@ -423,6 +425,7 @@ class Recorder extends Signals.EventEmitter {
 
             case PipelineState.STARTING:
                 // This is something we can handle, try to switch to the next pipeline
+                console.debug('Received EOS message while trying to start pipeline');
                 this._tryNextPipeline();
                 break;
 
@@ -452,7 +455,9 @@ class Recorder extends Signals.EventEmitter {
 
             break;
 
-        case Gst.MessageType.ERROR:
+        case Gst.MessageType.ERROR: {
+            const [error] = message.parse_error();
+
             switch (this._pipelineState) {
             case PipelineState.INIT:
             case PipelineState.STOPPED:
@@ -462,13 +467,12 @@ class Recorder extends Signals.EventEmitter {
 
             case PipelineState.STARTING:
                 // This is something we can handle, try to switch to the next pipeline
+                console.debug(`Received ERROR message while trying to start pipeline: ${error.message}`);
                 this._tryNextPipeline();
                 break;
 
             case PipelineState.PLAYING:
             case PipelineState.FLUSHING: {
-                const [error] = message.parse_error();
-
                 if (error.matches(Gst.ResourceError, Gst.ResourceError.NO_SPACE_LEFT)) {
                     this._handleFatalPipelineError('Out of disk space',
                         ScreencastErrors, ScreencastError.OUT_OF_DISK_SPACE);
@@ -486,6 +490,7 @@ class Recorder extends Signals.EventEmitter {
             }
 
             break;
+        }
 
         default:
             break;